﻿<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages.Administration, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.LogUsagePage" MasterPageFile="~/_admin/admin.master"      %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="AdminControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint.ApplicationPages.Administration" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<asp:Content contentplaceholderid="PlaceHolderPageTitle" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:content>
<asp:Content contentplaceholderid="PlaceHolderPageTitleInTitleArea" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_pagetitle%>" EncodeMethod='HtmlEncode'/>
</asp:Content>
<asp:content contentplaceholderid="PlaceHolderPageDescription" runat="server">
	<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_pagedesc%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
</asp:content>
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">


<script language="javascript">  
function EditUsageLogProcessor()
{
    window.open("EditUsageLogProcessor.aspx", "name", "height=455,width=450,toolbar=no,directories=no,status=no, menubar=no,scrollbars=no,resizable=no, modal=yes");
}
function    Visascii(ch)
{
	return (!(ch.charCodeAt(0) & 0x80));
}
function Visspace(ch)
{
	return (ch.charCodeAt(0) == 32) || ((9 <= ch.charCodeAt(0)) && (ch.charCodeAt(0) <= 13));
}
function stripWS(str)
{
	var b = 0;
	var e = str.length;
	while (str.charAt(b) && (Visascii(str.charAt(b)) && Visspace(str.charAt(b))))
		b++;
	while ((b < e) && (Visascii(str.charAt(e-1)) && Visspace(str.charAt(e-1))))
		e--;
	return ((b>=e)?"":str.substring(b, e ));
}
var L_NoFieldEmpty_TEXT = "<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,common_nofieldempty_TEXT%>' EncodeMethod='EcmaScriptStringLiteralEncode'/>";
function CheckForEmptyField(text_orig,field_name)
{
	var text = stripWS(text_orig);
	if (text.length == 0)
	{
		alert(StBuildParam(L_NoFieldEmpty_TEXT, field_name));
		return false;
	}
	return (true);
}
function CheckForEmptyFieldNoAlert(text_orig)
{
	var text = stripWS(text_orig);
	if (text.length == 0)
	{
		return false;
	}
	return (true);
}
var L_WrongEmailName_TEXT = "<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,common_wrongemailname_TEXT%>' EncodeMethod='EcmaScriptStringLiteralEncode'/>";
function CheckForAtSighInEmailName(text_orig,field_name)
{
	var text = stripWS(text_orig);
	if (!CheckForEmptyField(text_orig,field_name)) return false;
	var indexAt = 0;
	var countAt = 0;
	var countSpace = 0;
	var len = text.length;
	while(len--)
	{
		if (text.charAt(len) == '@')
		{
			indexAt = len;
			countAt++;
		}
		if (text.charAt(len) == ' ')
			countSpace ++;
	}
	if ((countAt == 0) ||
		(indexAt == 0) ||
		(indexAt == (text.length-1))
		)
	{
		alert(StBuildParam(L_WrongEmailName_TEXT, field_name));
		return false;
	}
	if (countSpace !=0 )
	{
		alert(L_TextWithoutSpaces1_TEXT + field_name);
		return false;
	}
	return (true);
}
	function CustomLogDirectoryValidation(sender, args)
	{
		var bValid = !((document.getElementById("<%= CbLogEnabled.ClientID %>")).value == "on");
		if (!bValid)
		{
			var logDir = (document.getElementById("<%= TxtLogDirectory.ClientID %>")).value;
			bValid = logDir.length > 2 &&
				((logDir.substr(0,2) == "\\\\") || (logDir.substr(1,2) == ":\\"));
		}
		args.IsValid = bValid;
		return;
	}
	function CustomNumLogFilesValidation(sender, args)
	{
		var bValid = !((document.getElementById("<%= CbLogEnabled.ClientID %>")).value == "on");
		if (!bValid)
		{
			var numFiles = (document.getElementById("<%= TxtLogFiles.ClientID %>")).value;
			var intNumFiles = parseInt(numFiles);
			if (intNumFiles == NaN || intNumFiles == 0)
				bValid = false;
			else
				bValid = (numFiles >= 1 && numFiles <= 30);
		}
		args.IsValid = bValid;
		return;
	}
	function _spBodyOnLoad()
	{
		CbLogEnabled_Clicked();
		CbUsageEnabled_Clicked();	
	   
		
	}
	
	function CbLogEnabled_Clicked()
	{
		var CbLogEnabled = (document.getElementById("<%= CbLogEnabled.ClientID %>"));
		var TxtLogDirectory = (document.getElementById("<%= TxtLogDirectory.ClientID %>"));
		var CbUsageEnabled = (document.getElementById("<%= CbUsageEnabled.ClientID %>"));
		TxtLogDirectory.disabled = !CbLogEnabled.checked;
		(document.getElementById("<%= TxtLogFiles.ClientID %>")).disabled     = !CbLogEnabled.checked;
		if (CbLogEnabled.checked)
			TxtLogDirectory.focus();
		if (!CbLogEnabled.checked || !CbUsageEnabled.checked)
		{
			CbUsageEnabled.checked = false;
			CbUsageEnabled_Clicked();
		}
		if (CbLogEnabled.checked)
			CbUsageEnabled.disabled = false;
		else
			CbUsageEnabled.disabled = true;
	
			
	}
	function CbUsageEnabled_Clicked()
	{
		var CbUsageEnabled = (document.getElementById("<%= CbUsageEnabled.ClientID %>"));
		var DdlDailyHourMin = (document.getElementById("<%= DdlDailyHourMin.ClientID %>"));
		DdlDailyHourMin.disabled   = !CbUsageEnabled.checked;
		(document.getElementById("<%= DdlDailyHourMax.ClientID %>")).disabled   = !CbUsageEnabled.checked;
		(document.getElementById("<%= DdlDailyMinuteMin.ClientID %>")).disabled = !CbUsageEnabled.checked;
		(document.getElementById("<%= DdlDailyMinuteMax.ClientID %>")).disabled = !CbUsageEnabled.checked;
		if (CbUsageEnabled.checked)
			DdlDailyHourMin.focus();
	}
</script>
</asp:content>
<asp:content contentplaceholderid="PlaceHolderMain" runat="server">
  <table width="100%" class="propertysheet" cellspacing="0" cellpadding="0" border="0"> <tr> <td class="ms-descriptionText"> <asp:Label ID="LabelMessage" Runat="server" EnableViewState="False" class="ms-descriptionText"/> </td> </tr> <tr> <td class="ms-error"><asp:Label ID="LabelErrorMessage" Runat="server" EnableViewState="False" /></td> </tr> <tr> <td class="ms-descriptionText"> <asp:ValidationSummary ID="ValSummary" HeaderText="<%$SPHtmlEncodedResources:spadmin, ValidationSummaryHeaderText%>" DisplayMode="BulletList" ShowSummary="True" runat="server"> </asp:ValidationSummary> </td> </tr> <tr> <td><img src="/_layouts/images/blank.gif" width="10" height="1" alt="" /></td> </tr> </table>
  <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
	<wssuc:InputFormSection Title="<%$Resources:spadmin, logusage_logset%>" runat="server">
		<Template_Description>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_logsetdesc%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
			<br><br>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_desc1%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
			<br><br>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_desc2%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
		</Template_Description>
		<Template_InputFormControls>
			<wssawc:InputFormCheckBox ID="CbLogEnabled" Runat="server"
				LabelText="<%$Resources:spadmin, logusage_enalog%>"
				OnCheckedChanged="CBCheckedChanged"
				onclick="CbLogEnabled_Clicked()" >
			  <Template_Control>
				 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="authoringcontrols">
					<wssuc:InputFormControl runat="server">
						<Template_LabelText>
							<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_fileloc%>" EncodeMethod='HtmlEncode'/>
						</Template_LabelText>
						<Template_control>
							<wssawc:InputFormTextBox Title="<%$Resources:spadmin, logusage_logfile%>" class="ms-input" ID="TxtLogDirectory" Columns="35" Runat="server" MaxLength=150 Direction="LeftToRight" />
							<wssawc:InputFormCustomValidator id="ReqTxtLogDirectory"
								ControlToValidate="TxtLogDirectory"
								ErrorMessage="<%$Resources:spadmin, logusage_direrr%>"
								ClientValidationFunction="CustomLogDirectoryValidation"
								OnServerValidate="CustomLogDirectoryValidation_ServerValidate"
								EnableClientScript="true" runat="server" />
						</Template_control>
					</wssuc:InputFormControl>
					<wssuc:InputFormControl runat="server">
						<Template_LabelText>
							<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_numfiles%>" EncodeMethod='HtmlEncode'/>
						</Template_LabelText>
						<Template_control>
							<wssawc:InputFormTextBox Title="<%$Resources:spadmin, logusage_numfilestext%>" class="ms-input" ID="TxtLogFiles" Columns="35" Runat="server" name="TxtLogFiles" MaxLength="2" width=30 />
							<wssawc:InputFormRangeValidator
								runat="server"
								id="RangeTxtStorageQuota"
								Type="Integer"
								MinimumValue="1"
								MaximumValue="30"
								ControlToValidate="TxtLogFiles"
								ErrorMessage="<%$Resources:spadmin, logusage_nferr%>" />
							<wssawc:InputFormRequiredFieldValidator
								runat="server"
								id="ReqValTxtLogFiles"
								ControlToValidate="TxtLogFiles"
								ErrorMessage="<%$Resources:spadmin, logusage_nferr%>" />
						</Template_control>
					</wssuc:InputFormControl>
				 </table>
			  </Template_Control>
			</wssawc:InputFormCheckBox>
		</Template_InputFormControls>
	</wssuc:InputFormSection>	
	<!--Begin Usage Processing timer job Settings -->
	<wssuc:InputFormSection Title="Configure Usage Log Processor" runat="server">
	    <Template_Description>
	        <SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
	    </Template_Description>
		<Template_InputFormControls>
		<asp:HyperLink runat="server" Font-Size="XX-Small"  ForeColor="DarkBlue" Font-Bold="false" Text="Set Usage Log Processor Timer Job Schedule" ID="HyperLink1" NavigateUrl= 'EditUsageLogProcessor.aspx' ></asp:HyperLink>						   							 
		  
	    </Template_InputFormControls>
	</wssuc:InputFormSection>
	
	<!-- End Usage Processing timer job Settings -->
	
	<!--Usage Processing Settings -->
	<wssuc:InputFormSection Title="<%$Resources:spadmin, logusage_procset%>" runat="server">		
		<Template_Description>
			<SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_procsetdesc%>" EncodeMethod='HtmlEncodeAllowSimpleTextFormatting'/>
		</Template_Description>
		<Template_InputFormControls>	
			<wssawc:InputFormCheckBox ID="CbUsageEnabled" Runat="server"
				LabelText="<%$Resources:spadmin, logusage_procsetenable%>"
				OnCheckedChanged="CBCheckedChanged"
				onclick="CbUsageEnabled_Clicked()" >
			  <Template_Control>
				 <table border="0" width="100%" cellspacing="0" cellpadding="0" class="authoringcontrols">
					<wssuc:InputFormControl LabelText="<%$Resources:spadmin, logusage_runproc%>" runat="server">
						<Template_control>
							<table>
							  <tr>
							   <td nowrap class="ms-authoringcontrols">
							   <SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_start%>" EncodeMethod='HtmlEncode'/>
							   </td>							   
							   <td nowrap class="ms-dttimeinput">
								 <asp:DropDownList ID="DdlDailyHourMin"  Runat="server" title="<%$Resources:spadmin, logusage_runhour%>" dir="<%$Resources:spadmin, multipages_direction_dir_value%>">
									 <asp:ListItem value="00" text="<%$Resources:spadmin, deletesiteconfig_id7%>" />
									 <asp:ListItem value="01" text="<%$Resources:spadmin, deletesiteconfig_id8%>" />
									 <asp:ListItem value="02" text="<%$Resources:spadmin, deletesiteconfig_id9%>" />
									 <asp:ListItem value="03" text="<%$Resources:spadmin, deletesiteconfig_id10%>" />
									 <asp:ListItem value="04" text="<%$Resources:spadmin, deletesiteconfig_id11%>" />
									 <asp:ListItem value="05" text="<%$Resources:spadmin, deletesiteconfig_id12%>" />
									 <asp:ListItem value="06" text="<%$Resources:spadmin, deletesiteconfig_id13%>" />
									 <asp:ListItem value="07" text="<%$Resources:spadmin, deletesiteconfig_id14%>" />
									 <asp:ListItem value="08" text="<%$Resources:spadmin, deletesiteconfig_id15%>" />
									 <asp:ListItem value="09" text="<%$Resources:spadmin, deletesiteconfig_id16%>" />
									 <asp:ListItem value="10" text="<%$Resources:spadmin, deletesiteconfig_id17%>" />
									 <asp:ListItem value="11" text="<%$Resources:spadmin, deletesiteconfig_id18%>" />
									 <asp:ListItem value="12" text="<%$Resources:spadmin, deletesiteconfig_id19%>" />
									 <asp:ListItem value="13" text="<%$Resources:spadmin, deletesiteconfig_id20%>" />
									 <asp:ListItem value="14" text="<%$Resources:spadmin, deletesiteconfig_id21%>" />
									 <asp:ListItem value="15" text="<%$Resources:spadmin, deletesiteconfig_id22%>" />
									 <asp:ListItem value="16" text="<%$Resources:spadmin, deletesiteconfig_id23%>" />
									 <asp:ListItem value="17" text="<%$Resources:spadmin, deletesiteconfig_id24%>" />
									 <asp:ListItem value="18" text="<%$Resources:spadmin, deletesiteconfig_id25%>" />
									 <asp:ListItem value="19" text="<%$Resources:spadmin, deletesiteconfig_id26%>" />
									 <asp:ListItem value="20" text="<%$Resources:spadmin, deletesiteconfig_id27%>" />
									 <asp:ListItem value="21" text="<%$Resources:spadmin, deletesiteconfig_id28%>" />
									 <asp:ListItem value="22" text="<%$Resources:spadmin, deletesiteconfig_id29%>" />
									 <asp:ListItem value="23" text="<%$Resources:spadmin, deletesiteconfig_id30%>" />
								</asp:DropDownList>
								<asp:DropDownList ID="DdlDailyMinuteMin" Runat="server"  title="<%$Resources:spadmin, logusage_runminute%>" dir="<%$Resources:spadmin, multipages_direction_dir_value%>">
									 <asp:ListItem value="00" text="<%$Resources:spadmin, deletesiteconfig_id31%>" />
									 <asp:ListItem value="15" text="<%$Resources:spadmin, deletesiteconfig_id32%>" />
									 <asp:ListItem value="30" text="<%$Resources:spadmin, deletesiteconfig_id33%>" />
									 <asp:ListItem value="45" text="<%$Resources:spadmin, deletesiteconfig_id34%>" />
								</asp:DropDownList>
							   </td>
							   <td width="100%"></td>
							 </tr>
							 <tr>
							   <td nowrap class="ms-authoringcontrols">
							   <SharePoint:EncodedLiteral runat="server" text="<%$Resources:spadmin, logusage_end%>" EncodeMethod='HtmlEncode'/>
							   </td>
							   <td nowrap class="ms-dttimeinput">
								<asp:DropDownList ID="DdlDailyHourMax" Runat="server"  title="<%$Resources:spadmin, logusage_endhour%>" dir="<%$Resources:spadmin, multipages_direction_dir_value%>">
								  <asp:ListItem value="00" text="<%$Resources:spadmin, deletesiteconfig_id7%>" />
									 <asp:ListItem value="01" text="<%$Resources:spadmin, deletesiteconfig_id8%>" />
									 <asp:ListItem value="02" text="<%$Resources:spadmin, deletesiteconfig_id9%>" />
									 <asp:ListItem value="03" text="<%$Resources:spadmin, deletesiteconfig_id10%>" />
									 <asp:ListItem value="04" text="<%$Resources:spadmin, deletesiteconfig_id11%>" />
									 <asp:ListItem value="05" text="<%$Resources:spadmin, deletesiteconfig_id12%>" />
									 <asp:ListItem value="06" text="<%$Resources:spadmin, deletesiteconfig_id13%>" />
									 <asp:ListItem value="07" text="<%$Resources:spadmin, deletesiteconfig_id14%>" />
									 <asp:ListItem value="08" text="<%$Resources:spadmin, deletesiteconfig_id15%>" />
									 <asp:ListItem value="09" text="<%$Resources:spadmin, deletesiteconfig_id16%>" />
									 <asp:ListItem value="10" text="<%$Resources:spadmin, deletesiteconfig_id17%>" />
									 <asp:ListItem value="11" text="<%$Resources:spadmin, deletesiteconfig_id18%>" />
									 <asp:ListItem value="12" text="<%$Resources:spadmin, deletesiteconfig_id19%>" />
									 <asp:ListItem value="13" text="<%$Resources:spadmin, deletesiteconfig_id20%>" />
									 <asp:ListItem value="14" text="<%$Resources:spadmin, deletesiteconfig_id21%>" />
									 <asp:ListItem value="15" text="<%$Resources:spadmin, deletesiteconfig_id22%>" />
									 <asp:ListItem value="16" text="<%$Resources:spadmin, deletesiteconfig_id23%>" />
									 <asp:ListItem value="17" text="<%$Resources:spadmin, deletesiteconfig_id24%>" />
									 <asp:ListItem value="18" text="<%$Resources:spadmin, deletesiteconfig_id25%>" />
									 <asp:ListItem value="19" text="<%$Resources:spadmin, deletesiteconfig_id26%>" />
									 <asp:ListItem value="20" text="<%$Resources:spadmin, deletesiteconfig_id27%>" />
									 <asp:ListItem value="21" text="<%$Resources:spadmin, deletesiteconfig_id28%>" />
									 <asp:ListItem value="22" text="<%$Resources:spadmin, deletesiteconfig_id29%>" />
									 <asp:ListItem value="23" text="<%$Resources:spadmin, deletesiteconfig_id30%>" />
								</asp:DropDownList>
								<asp:DropDownList ID="DdlDailyMinuteMax" Runat="server" title="<%$Resources:spadmin, logusage_endminute%>" dir="<%$Resources:spadmin, multipages_direction_dir_value%>">
									 <asp:ListItem value="00" text="<%$Resources:spadmin, deletesiteconfig_id31%>" />
									 <asp:ListItem value="15" text="<%$Resources:spadmin, deletesiteconfig_id32%>" />
									 <asp:ListItem value="30" text="<%$Resources:spadmin, deletesiteconfig_id33%>" />
									 <asp:ListItem value="45" text="<%$Resources:spadmin, deletesiteconfig_id34%>" />
								</asp:DropDownList>
							   </TD>
							   <td width="100%"></td>
							 </TR>
						  </TABLE>
						</Template_control>
					</wssuc:InputFormControl>
				 </table>
			  </Template_Control>
			</wssawc:InputFormCheckBox>
		</Template_InputFormControls>
	</wssuc:InputFormSection>	
	<wssuc:ButtonSection runat="server">
		<Template_Buttons>
			<asp:Button UseSubmitBehavior="false" runat="server" class="ms-ButtonHeightWidth" OnClick="BtnSetUsage_Click" Text="<%$Resources:wss,multipages_okbutton_text%>" id="BtnSetUsage" accesskey="<%$Resources:wss,okbutton_accesskey%>"/>
		</Template_Buttons>
	</wssuc:ButtonSection>	
	
  </TABLE>
</asp:content>

